package com.vhall.component.entity.order.vo;

import com.vhall.component.framework.common.annotation.ParamName;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author guoxin.wang
 * @date 2021/7/5 10:30
 */
@Data
public class OrderListReqVo implements Serializable {

    private static final long serialVersionUID = 7662807043733313049L;

    @NotBlank(message = "app_id参数错误")
    @ParamName(value = "app_id")
    private String appId;

    @ParamName("account_id")
    private String accountId;

    @NotNull(message = "type参数错误")
    @ParamName(value = "type")
    private Integer type;

    private Integer status;

    @ParamName("start_time")
    @Pattern(regexp = "^((([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29))",
            message = "时间格式应为：yyyy-MM-dd")
    private String startTime;

    @ParamName("end_time")
    @Pattern(regexp = "^((([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29))",
            message = "时间格式应为：yyyy-MM-dd")
    private String endTime;

    @ParamName("page")
    private Integer currPage;

    @ParamName("page_size")
    private Integer pageSize;

}
